<template>
  <div>index</div>

  <button class="uni-button">登录</button>
  <text class="iconfont icon-cedaohang_shouye xx"</text>
  <text class="iconfont icon-checked xx"</text>
  <text class="iconfont icon-truck xx"</text>
  <text class="iconfont icon-box xx"</text>
    <button class="uni-button" @click="test">请求</button>

 
  <uni-icons
    custom-prefix="iconfont"
    type="icon-done"
    color="green"
    size="50"
  />

    <text class="uniui-icon uniui-icon-symbol-tool-03 yy"</text>

<!-- <view>计数: {{ store.count }}</view>
<view>双倍: {{ store.double }}</view>
<button @click="store.increment()">加1</button>
<button @click="store.decrement()">减1</button>
<view>计数: {{ store }}</view>
<view>双倍: {{ store.double }}</view>
<button @click="store.increment()">加1</button>
<button @click="store.decrement()">减1</button> -->
<view>计数: {{ store.count }}</view>
<view>计数: {{ store.num1 }}</view>
<button @click="store.increment()">加1</button>
<button @click="store.decrement()">减1</button>



</template>

<script setup lang="ts">
import { request } from '@/utils/http';
import { loginByPassAPI } from '../../apis/user';
import { useCounterStore } from '@/stores/count'
import type{ type } from '@/types/user';
const store = useCounterStore()

const test = async() => {
  // request.post('/login/password', {
  //     password: 'abc123451',
  //     mobile:'13211112222'
  // }).then(res => {
  //     console.log(res)
  // })
  //   .catch((err)=>{
  //     console.log(err)
  //   })
  const res  = await loginByPassAPI({
    password: 'abc12345',
    mobile:'13211112222'
  })
  console.log(res.token)
  const res1 = await request.get<null,type>('/patient/myUser')
  console.log(res1.account)
  uni.navigateTo({ url: '/subpkg_archive/form/index' })
 }

</script>

<style lang="scss" scoped>
.xx{
  font-size: 50px;
  color: red;
}
.yy{
  width: 100rpx;
  height: 100rpx;
}
</style>
